Video digitizer components support color digitization. Therefore, these components provide several functions that allow applications to control the color digitization process.
You can use VDSetInputColorSpaceMode in your application to enable and disable color digitization; you can use the VDGetInputColorSpaceMode function to determine whether color digitization is enabled. The VDUseThisCLUT function allows you to specify a color lookup table to be used by the video digitizer component. In cases where the component cannot accommodate a particular lookup table, your application can use the VDGetCLUTInUse function to retrieve the color lookup table used by the digitizer component.
Your application can determine whether a digitizer component supports color digitization by examining the input capability flags of the component. Specifically, if the digiInDoesColor flag is set to 1, the component supports color digitization. Applications can use the VDGetCurrentFlags function to obtain the input capability flags of a component (see "Getting Information About Video Digitizer Components" for more information).
Your application can determine a digitizer's supported pixel depths by calling the VDGetDMADepths function.
Some video digitizer components allow applications to specify the lookup table for color digitization. Your application can set the color lookup table by calling the VDUseThisCLUT function.
pascal VideoDigitizerError VDUseThisCLUT
(VideoDigitizerComponent ci,
CTabHandle colorTableHandle);
Applications can determine whether a digitizer component supports specified lookup tables by examining the digitizer component's output capability flags. Specifically, if the digiOutDoesILUT flag is set to 1, the digitizer component allows applications to specify color lookup tables. Applications can use the VDGetCurrentFlags function (described on VDGetCurrentFlags ) to obtain the input capability flags of a component.
This feature is only useful for capturing 8-bit color video.
The VDGetCLUTInUse function allows an application to obtain the color lookup table used by a video digitizer component. By using the Palette Manager, the application can then set the destination so that it uses the same lookup table.
pascal VideoDigitizerError VDGetCLUTInUse
(VideoDigitizerComponent ci,
CTabHandle *colorTableHandle);
In general, applications use this function only when a video digitizer component does not allow applications to specify lookup tables with the VDUseThisCLUT function. Applications can determine whether a digitizer component supports specified lookup tables by examining the component's output capability flags. Specifically, if the digiOutDoesILUT flag is set to 1, the digitizer component allows applications to specify color lookup tables. Applications can use the VDGetCurrentFlags function (described on VDGetCurrentFlags ) to obtain the input capability flags of a component.
The VDSetInputColorSpaceMode function allows applications to choose between color and grayscale digitized video.
pascal VideoDigitizerError VDSetInputColorSpaceMode
(VideoDigitizerComponent ci,
short colorSpaceMode);
Applications can determine whether a digitizer component supports grayscale or color digitization by examining the digitizer component's input capability flags. Specifically, if the digiInDoesColor flag is set to 1, the digitizer component supports color digitization. Similarly, if the digiInDoesBW flag is set to 1, the digitizer component supports grayscale digitization. Applications can use the VDGetCurrentFlags function (described on VDGetCurrentFlags ) to obtain the input capability flags of a digitizer component.
The VDGetInputColorSpaceMode function allows applications to determine whether a digitizer is operating in color or grayscale mode.
pascal VideoDigitizerError VDGetInputColorSpaceMode
(VideoDigitizerComponent ci,
short *colorSpaceMode);
Applications can determine whether a digitizer component supports grayscale or color digitization by examining the digitizer component's input capability flags. Specifically, if the digiInDoesColor flag is set to 1, the digitizer component supports color digitization. Similarly, if the digiInDoesBW flag is set to 1, the digitizer component supports grayscale digitization. Applications can use the VDGetCurrentFlags function (described on VDGetCurrentFlags ) to obtain the input capability flags of a digitizer component.
The VDGetDMADepths function allows an application to determine which pixel depths a digitizer supports. This function is supported only by digitizers that support DMA (that is, their digiOutDoesDMA output capability flag is set to 1).
pascal VideoDigitizerError VDGetDMADepths
(VideoDigitizerComponent ci,
long *depthArray,
long *preferredDepth);
The flags returned by this function augment the information that an application can obtain from the digitizer's output capability flags in the digitizer information structure (see "Capability Flags," for more information). If a digitizer does not support this function but does support DMA, an application may assume that the digitizer can handle offscreen buffers at all of the depths indicated in its output capabilities flags.
Before a program that uses a video digitizer creates an offscreen buffer, it should call the VDGetDMADepths function to determine the pixel depths supported by the digitizer. If possible, the program should use the preferred depth, in order to obtain the best possible display performance.
Applications may use the following enumerators to set bits in the field referred to by the depthArray parameter.
enum {
dmaDepth1 = 1, /* supports black and white */
dmaDepth2 = 2, /* supports 2-bit color */
dmaDepth4 = 4, /* supports 4-bit color */
dmaDepth8 = 8, /* supports 8-bit color */
dmaDepth16 = 16, /* supports 16-bit color */
dmaDepth32 = 32, /* supports 32-bit color */
dmaDepth2Gray = 64, /* supports 2-bit grayscale */
dmaDepth4Gray = 128, /* supports 4-bit grayscale */
dmaDepth8Gray = 256 /* supports 8-bit grayscale */
};